﻿using System;
using System.Collections.Generic;
using System.Text;
using HAVNet.Core;
using HAVNet.Core.String;


namespace HAVNet.Intros.AST
{
    public class ASTSwitchLabels : List<ASTSwitchLabel>
    {
        public override string ToString()
        {
            return Strings.joinobjs (Environment.NewLine, this);
        }
    }

    public class ASTSwitchLabel : ASTNode
    {
        public ASTExpr expression { get; set; }

        public override string ToString()
        {
            if (null == expression)
                return "default :";
            else
                return "case " + expression.ToString() + " :";
        }
    }
}
